package com.czeczek.domain;

import java.math.BigDecimal;

public class IndicatorQuote extends Quote {
	
	private long id;
	private long indicatorId;	
    private BigDecimal value;
    
    public IndicatorQuote(Quote quote) {
    	super(quote);
    }
    
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public long getIndicatorId() {
		return indicatorId;
	}
	public void setIndicatorId(long indicatorId) {
		this.indicatorId = indicatorId;
	}
	public BigDecimal getValue() {
		return value;
	}
	public void setValue(BigDecimal value) {
		this.value = value;
	}

	@Override
	public String toString() {
		return "IndicatorQuote [id=" + id + ", indicatorId=" + indicatorId
				+ ", value=" + value + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + (int) (id ^ (id >>> 32));
		result = prime * result + (int) (indicatorId ^ (indicatorId >>> 32));
		result = prime * result + ((value == null) ? 0 : value.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		IndicatorQuote other = (IndicatorQuote) obj;
		if (id != other.id)
			return false;
		if (indicatorId != other.indicatorId)
			return false;
		if (value == null) {
			if (other.value != null)
				return false;
		} else if (!value.equals(other.value))
			return false;
		return true;
	}
    

    
}
